﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Sector7.Medical.EntityType;
using Sector7.Medical.Enums;

namespace Sector7.Medical.Services
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码和配置文件中的接口名“IBusinessService”。
    [ServiceContract]
    public interface IBusinessService
    {
        #region /// ChargeRecord

        /// <summary>
        /// 添加费用信息
        /// </summary>
        /// <param name="chargeRecord">费用信息</param>
        /// <returns></returns>
        [OperationContract]
        int AddChargeRecord(M7_ChargeRecord chargeRecord);

        #endregion

        #region /// RegistryRecord

        /// <summary>
        /// 添加挂号信息
        /// </summary>
        /// <param name="patient">挂号信息</param>
        /// <returns></returns>
        [OperationContract]
        int AddRegistryRecord(M7_RegistryRecord registryRecord);

        /// <summary>
        /// 获取一天的挂号记录
        /// </summary>
        /// <param name="date"></param>
        /// <returns></returns>
        [OperationContract]
        List<M7_RegistryRecord> GetRegistryRecoredListInOneDay(DateTime date);

        #endregion

        #region /// Patient

        /// <summary>
        /// 添加病人信息
        /// </summary>
        /// <param name="patient">病人信息</param>
        /// <returns></returns>
        [OperationContract]
        int AddPatient(M7_Patient patient);

        /// <summary>
        /// 根据登记号获取病人信息
        /// </summary>
        /// <param name="registryNoType">登记号类型</param>
        /// <param name="registryNo">登记号</param>
        /// <returns></returns>
        [OperationContract]
        M7_Patient GetPatientByRegistryNo(RegistryNoType registryNoType, object registryNo);

        #endregion

        #region ///MedicalReocrd

        /// <summary>
        /// 添加电子病历信息
        /// </summary>
        /// <param name="medicalRecord"></param>
        /// <returns></returns>
        [OperationContract]
        int AddMedicalRecord(M7_MedicalRecord medicalRecord);

        /// <summary>
        /// 根据人员信息编码和状态获取电子病历信息
        /// </summary>
        /// <param name="citizen"></param>
        /// <param name="status"></param>
        /// <returns></returns>
        [OperationContract]
        List<M7_MedicalRecord> GetMedicalRecordByCitizenAndStatus(string citizen, int status);

        /// <summary>
        /// 获取最近十条病历信息
        /// </summary>
        /// <param name="citizenId">公民编号</param>
        /// <returns></returns>
        [OperationContract]
        List<M7_MedicalRecord> GetRecentTenMedicalRecordList(string citizenId);

        #endregion

        #region ///Recipe

        /// <summary>
        /// 添加处方信息
        /// </summary>
        /// <param name="recipe"></param>
        /// <returns></returns>
        [OperationContract]
        int AddRecipe(M7_Recipe recipe);

        /// <summary>
        /// 根据电子病历编号和单据状态获取所有处方单信息
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<M7_Recipe> GetPatientRecipeListByEmrIdAndStatus(long emrId, int status);

        #endregion
    }
}
